package com.monkey.bean;

import lombok.Data;
import lombok.Setter;

@Setter
public class PageRequest {

    private Long currentPage=1L;

    private Long pageSize=10L;

    public Long getCurrentPage(){
        if(currentPage==null || currentPage<1){
            return 1L;
        }
        return currentPage;
    }

    public Long getPageSize(){
        if(pageSize==null || pageSize<=0 || pageSize>Integer.MAX_VALUE){
            return 10L;
        }
        return pageSize;
    }
}
